330 LOCATE 15,10,0,11,12:PRINT "Press any key to start the game."
340 STRT$=INKEY$:IF STRT$="" THEN 340
350 DIM C(17)
360 BL$=" "
370 CLS
380 LOCATE 10,10,0
390 PRINT "Do you need instructions (Y/N)?";
400 B$=INKEY$: IF B$="" THEN 400
410 IF B$="y" OR B$="Y" OR B$="n" OR B$="N" THEN 420 ELSE 400
420 IF B$="y" OR B$="Y" THEN GOSUB 1080
430 CLS
440 LOCATE 10,10,0
450 RANDOMIZE
460 CLS
470 LOCATE 10,10,0
480 PRINT "How many rocks do want you the computer to hide (0-9)?"
490 PRINT :PRINT TAB(17) "(Pressing `X' will end the game.)
500 B$=INKEY$:IF B$="" THEN 500
510 IF B$="0" THEN 8000
520 IF B$="X" OR B$="x" THEN LOCATE ,,1,11,12:CLS:CHAIN "MENU.BAS"
530 IF ASC(B$)>48 AND ASC(B$)<58 THEN 540 ELSE 500
540 CLS:B=VAL(B$):F=B
550 WHILE B>0
560 ROW=INT(RND*8+1)
570 COL=INT(RND*8+1)
580 IF B(ROW,COL)=-1 THEN 560
590 B(ROW,COL)=-1
600 B=B-1
610 WEND
620 RESTORE
630 FOR COL=1 TO 8
640 B(0,COL)=33-COL
650 B(9,COL)=8+COL
660 NEXT COL
670 FOR ROW=1 TO 8
680 B(ROW,0)=ROW
690 B(ROW,9)=25-ROW
700 NEXT ROW
710 FOR I=1 TO 17
720 READ C(I)
730 NEXT I
740 DATA 64,35,36,37,42,43,157,155,232,247,4,14,234,251,21,240,206
750 GUESS=0
760 LOCATE 3,29,0
770 PRINT "32 31 30 29 28 27 26 25"
780 FOR I=1 TO 8
790 READ A$
800 PRINT TAB(26) A$;
810 READ A$
820 PRINT TAB(54) A$
830 NEXT I
840 DATA "01","24","02","23","03","22","04","21","05","20","06","19","07", "18","08","17"
850 PRINT TAB(29) "09 10 11 12 13 14 15 16"
860 IF CRE=2 THEN RETURN
870 LOCATE 7,1
880 COLOR 7,1
890 IF F=1 THEN 900 ELSE PRINT F;"Rocks are hidden.":GOTO 910
900 PRINT F;"Rock is hidden."
910 LOCATE 15,1
920 PRINT TAB(20) "A. Review instructions. ";
930 PRINT TAB(20) "B. Place a rock on the screen. ";
940 PRINT TAB(20) "C. Remove a rock from the screen. ";
950 PRINT TAB(20) "D. Trace a path on the screen. ";
960 PRINT TAB(20) "E. Ask for a clue. ";
970 PRINT TAB(20) "F. Enter the screen display as your solution. ";
980 PRINT TAB(20) "G. Ask for the solution. ";
990 PRINT TAB(80)
1000 PRINT TAB(20) "Please type the letter of the function you want: ";
1010 B$=INKEY$:IF B$="" THEN 1010
1020 IF ASC(B$)<65 OR (ASC(B$)>71 AND ASC(B$)<97) OR ASC(B$)>103 THEN 1010
1030 IF ASC(B$)<97 THEN 1060
1040 ON (ASC(B$)-96) GOSUB 1080,2420,3130,3450,5340,7310,7690
1050 GOTO 910
1060 ON (ASC(B$)-64) GOSUB 1080,2420,3130,3450,5340,7310,7690
1070 GOTO 910
1080 IF SCREEN(3,29)<>51 THEN CLS ELSE GOSUB 15030
1090 LOCATE 25,1
1100 PRINT "Press the space bar to continue or `X' to end instructions.";
1110 LOCATE 1,1
1120 PRINT TAB(30) "BLACK BOX INSTRUCTIONS"
1130 RESTORE 840
1140 LOCATE 3,29
1150 PRINT "32 31 30 29 28 27 26 25"
1160 FOR I=1 TO 8
1170 READ A$
1180 LOCATE I+3,26:PRINT A$;
1190 READ A$
1200 PRINT TAB(54) A$
1210 NEXT I
1220 PRINT TAB(29) "09 10 11 12 13 14 15 16"
1230 LOCATE 15,1
1240 PRINT " Black Box is a game of deduction. The computer hides a number of rocks (";CHR$(2);") on the grid above and your task is to find them."
1250 PRINT " This is done by asking the computer for `clues'. The clue must be for a number 1 through 32. The computer replies with an answer, which may be `HIT!', `Reflection!' or another number.
1260 PRINT " The computer arrives at an answer by sending an X-ray into the grid from the number you call, and by virtue of the way the ray behaves in the grid, the answer is deduced."
1270 B$=INKEY$:IF B$<>" " AND B$<>"x" AND B$<>"X" THEN 1270
1280 IF B$<>" " THEN 2290
1290 GOSUB 15030
1300 LOCATE 15,1
1310 PRINT " A ray will always go straight unless `deflected' from a rock."
1320 LOCATE 4,35
1330 PRINT "(";CHR$(2);")"
1340 LOCATE 4,47
1350 PRINT "(";CHR$(2);")"
1360 LOCATE 5,29
1370 FOR I=1 TO 4
1380 PRINT "SOUND";:FOR J=1 TO 100:NEXT J
1390 NEXT I
1400 PRINT "COLOR"
1410 FOR I=6 TO 11
1420 LOCATE I,33
1430 PRINT "CALL"
1440 FOR J=1 TO 300:NEXT J
1450 NEXT I
1460 FOR I=11 TO 6 STEP -1
1470 LOCATE I,39
1480 PRINT "CALL"
1490 FOR J=1 TO 300:NEXT J
1500 NEXT I
1510 LOCATE 5,39:PRINT "VARPTR"
1520 FOR I=40 TO 44
1530 LOCATE 5,I
1540 PRINT "SOUND";
1550 FOR J=1 TO 100:NEXT J
1560 NEXT I
1570 PRINT "COLOR"
1580 FOR I=6 TO 11
1590 LOCATE I,45
1600 PRINT "CALL"
1610 FOR J=1 TO 300:NEXT J
1620 NEXT I
1630 LOCATE 16,1
1640 PRINT " This will happen because a ray is not permitted to pass by a rock in the adjacent row or column. When this would occur, the ray deflects away at right"
1650 PRINT "angles to its previous path and away from the rock (#02,#10)."
1660 PRINT " This may involve only one rock, or a series of rocks to cause the ray to exit at virtually any location, depending on the rocks' positions (#12,#14)."
1670 B$=INKEY$:IF B$<>" " AND B$<>"x" AND B$<>"X" THEN 1670
1680 IF B$<>" " THEN 2290
1690 GOSUB 15030:GOSUB 15080
1700 LOCATE 15,1
1710 PRINT " A `HIT!' may occur in one of two ways:"
1720 LOCATE 6,50
1730 PRINT "(";CHR$(2);")"
1740 LOCATE 6,29
1750 FOR I=1 TO 20
1760 PRINT "SOUND";
1770 FOR J=1 TO 100:NEXT J
1780 NEXT I
1790 PRINT "*"
1800 LOCATE 16,1
1810 PRINT " a: A ray may come from a number and hit a rock head on (#03)."
1820 PRINT " b: A ray may not be able to enter onto the board because a rock is in the way (#22)."
1830 B$=INKEY$:IF B$<>" " AND B$<>"x" AND B$<>"X" THEN 1830
1840 IF B$<>" " THEN 2290
1850 GOSUB 15030:GOSUB 15080
1860 LOCATE 15,1
1870 PRINT " A `Reflection!' also may occur in one of two ways:"
1880 LOCATE 8,50
1890 PRINT "(";CHR$(2);")"
1900 LOCATE 7,29
1910 FOR I=1 TO 20
1920 PRINT "SOUND";
1930 FOR J=1 TO 100:NEXT J
1940 NEXT I
1950 PRINT "<0xB5!>"
1960 FOR I=48 TO 29 STEP -1
1970 LOCATE 7,I
1980 PRINT "THEN"
1990 FOR J=1 TO 100:NEXT J
2000 NEXT I
2010 LOCATE 16,1
2020 PRINT " a: A ray may come to two rocks situated such that it cannot pass between them or veer away because it would pass next to one of them.";
2030 PRINT " In such a case the ray must backtrack to its source (#04)."
2040 PRINT " b: A ray may not be able to enter onto the board because it would be passing next to a rock(#23,#21,#19)."
2050 PRINT :PRINT " NOTE: A `HIT!' always takes precedence over a `Reflection!' or a deflection in such cases where more than one have their rules satisfied."
2060 B$=INKEY$:IF B$<>" " AND B$<>"x" AND B$<>"X" THEN 2060
2070 IF B$<>" " THEN 2290
2080 GOSUB 15030:GOSUB 15080
2090 LOCATE 15,1
2100 PRINT " You may use the screen above while playing the game to display rocks in any location, without it being `fixed', and you may change their positions on"
2110 PRINT "the screen. This does NOT affect the actual solution. You can use the `Trace' option to show you the way a ray would travel if the rocks were placed as they are on the screen."
2120 PRINT " When you are satisfied that the rocks as you have them displayed on the screen are correct, you may enter the screen as a proposed solution and the computer will tell you whether the display matches the hidden rocks'"
2130 PRINT "positions."
2140 B$=INKEY$:IF B$<>" " AND B$<>"x" AND B$<>"X" THEN 2140
2150 IF B$<>" " THEN 2290
2160 GOSUB 15030
2170 LOCATE 15,1
2180 PRINT " Your scoring potential increases as you ask for larger numbers of rocks, but the chances of unsolvable combinations also increases. 5 is the recommended number."
2190 PRINT " Your score decreases as you ask for more clues or give an incorrect guess of the solution. A score of 100 or more is very good."
2200 B$=INKEY$:IF B$<>" " AND B$<>"x" AND B$<>"X" THEN 2200
2210 IF B$<>" " THEN 2290
2220 GOSUB 15030
2230 LOCATE 15,1
2240 PRINT " After you have gained some experience in playing the game, you may want to try setting up some of your own layouts. These can be saved for later"
2250 PRINT "solution, or entered immediately in place of the computer's setup, for solution by a second player. You do this by entering zero when the computer asks you how many rocks you want hidden."
2260 PRINT :PRINT TAB(30) "GOOD HUNTING!"
2270 B$=INKEY$:IF B$<>" " AND B$<>"x" AND B$<>"X" THEN 2270
2280 IF B$<>" " THEN 2290
2290 LOCATE 25,1
2300 PRINT " ";
2310 LOCATE 1,30
2320 PRINT " "
2330 FOR I=4 TO 11
2340 FOR J=30 TO 51 STEP 3
2350 LOCATE I,J-1
2360 IF S(I-3,J/3-9)=-1 THEN PRINT "(";CHR$(2);")" ELSE PRINT " "
2370 NEXT J
2380 NEXT I
2390 GOSUB 15030
2400 RESTORE
2410 RETURN
2420 GOSUB 15030
2430 LOCATE 15,1
2440 PRINT TAB(20) "Putting a rock on the screen"
2450 PRINT :PRINT
2460 PRINT TAB(10) "Use the directional keys at right to move the marker ";
2470 COLOR 15,0
2480 PRINT CHR$(2)
2490 COLOR 7,0
2500 PRINT TAB(10) "to the position where you want a rock placed, then press `Enter'."
2510 COLOR 15,0
2520 LOCATE 4,30
2530 PRINT CHR$(2)
2540 LOCATE 4,30
2550 ON KEY(11) GOSUB 2730
2560 ON KEY(14) GOSUB 2830
2570 ON KEY(13) GOSUB 2930
2580 ON KEY(12) GOSUB 3030
2590 KEY(11) ON
2600 KEY(12) ON
2610 KEY(13) ON
2620 KEY(14) ON
2630 MOVE$=INKEY$:IF MOVE$<>CHR$(13) THEN 2630
2640 LOCATE CSRLIN,POS(0)-1
2645 IF S(CSRLIN-3,(POS(0)-26)/3)=-1 THEN PREV=1 ELSE PREV=0
2650 S(CSRLIN-3,(POS(0)-26)/3)=-1
2660 COLOR 7,0
2670 PRINT CHR$(40);CHR$(2);CHR$(41)
2671 IF SCREEN(8,1)=68 AND PREV=0 THEN LOCATE 8,1:PRINT "Displayed: None"
2672 PREV=0
2680 KEY(11) OFF
2690 KEY(12) OFF
2700 KEY(13) OFF
2710 KEY(14) OFF
2720 RETURN
2730 IF CSRLIN=4 THEN RETURN
2740 IF S(CSRLIN-3,(POS(0)-27)/3)=0 THEN 2750 ELSE 2760
2750 PRINT " ";:GOTO 2790
2760 COLOR 7,0
2770 PRINT CHR$(2);
2780 COLOR 15,0
2790 LOCATE CSRLIN-1,POS(0)-1
2800 PRINT CHR$(2);
2810 LOCATE CSRLIN,POS(0)-1
2820 RETURN
2830 IF CSRLIN=11 THEN RETURN
2840 IF S(CSRLIN-3,(POS(0)-27)/3)=0 THEN 2850 ELSE 2860
2850 PRINT " ";:GOTO 2890
2860 COLOR 7,0
2870 PRINT CHR$(2);
2880 COLOR 15,0
2890 LOCATE CSRLIN+1,POS(0)-1
2900 PRINT CHR$(2);
2910 LOCATE CSRLIN,POS(0)-1
2920 RETURN
2930 IF POS(0)=51 THEN RETURN
2940 IF S(CSRLIN-3,(POS(0)-27)/3)=0 THEN 2950 ELSE 2960
2950 PRINT " ";:GOTO 2990
2960 COLOR 7,0
2970 PRINT CHR$(2);
2980 COLOR 15,0
2990 LOCATE CSRLIN,POS(0)+2
3000 PRINT CHR$(2);
3010 LOCATE CSRLIN,POS(0)-1
3020 RETURN
3030 IF POS(0)=30 THEN RETURN
3040 IF S(CSRLIN-3,(POS(0)-27)/3)=0 THEN 3050 ELSE 3060
3050 PRINT " ";:GOTO 3090
3060 COLOR 7,0
3070 PRINT CHR$(2);
3080 COLOR 15,0
3090 LOCATE CSRLIN,POS(0)-4
3100 PRINT CHR$(2);
3110 LOCATE CSRLIN,POS(0)-1
3120 RETURN
3130 GOSUB 15030
3140 LOCATE 15,1
3150 PRINT TAB(20) "Removing a rock from the screen"
3160 PRINT :PRINT
3170 PRINT TAB(10) "Use the directional keys at right to move the marker ";
3180 COLOR 15,0
3190 PRINT CHR$(2)
3200 COLOR 7,0
3210 PRINT TAB(10) "to the position from where you want a rock removed,"
3220 PRINT TAB(10) "then press `Enter'."
3230 COLOR 15,0
3240 LOCATE 4,30
3250 PRINT CHR$(2)
3260 LOCATE 4,30
3270 ON KEY(11) GOSUB 2730
3280 ON KEY(14) GOSUB 2830
3290 ON KEY(13) GOSUB 2930
3300 ON KEY(12) GOSUB 3030
3310 KEY(11) ON
3320 KEY(12) ON
3330 KEY(13) ON
3340 KEY(14) ON
3350 MOVE$=INKEY$:IF MOVE$<>CHR$(13) THEN 3350
3360 LOCATE CSRLIN,POS(0)-1
3365 IF S(CSRLIN-3,(POS(0)-26)/3)=0 THEN PREV=1 ELSE PREV=0
3370 S(CSRLIN-3,(POS(0)-26)/3)=0
3380 COLOR 7,0
3390 PRINT CHR$(0);CHR$(0);CHR$(0)
3391 IF SCREEN(8,1)=68 AND PREV=0 THEN LOCATE 8,1:PRINT "Displayed: None"
3392 PREV=0
3400 KEY(11) OFF
3410 KEY(12) OFF
3420 KEY(13) OFF
3430 KEY(14) OFF
3440 RETURN
3450 GOSUB 15030
3460 LOCATE 15,20
3470 PRINT "Trace a path on the screen:"
3480 PRINT :PRINT
3490 PRINT "What number would you like to see traced (01-32)?";
3500 B$=INKEY$:IF B$="" THEN 3500
3510 IF ASC(B$)<48 OR ASC(B$)>51 THEN 3500
3520 C$=B$
3530 PRINT C$;
3540 B$=INKEY$:IF B$="" THEN 3540
3550 IF ASC(B$)<48 OR ASC(B$)>57 THEN 3540
3560 IF C$="3" AND ASC(B$)>50 THEN 3540
3570 C$=C$+B$
3580 P=VAL(C$)
3590 PRINT B$
3600 'ENTER ROUTINE:
3610 'ENTER RIGHT:
3620 IF P>8 THEN 3700
3630 IF S(P,1)<>-1 THEN 3660
3640 PRINT :PRINT TAB(20) "HIT! Ray can't enter board."
3650 GOTO 5240
3660 IF S(P-1,1)<>-1 AND S(P+1,1)<>-1 THEN LOCATE P+3,27:GOTO 3920
3670 PRINT :PRINT TAB(20) "Reflection! Ray can't enter board."
3680 GOTO 5240
3690 'ENTER UP
3700 IF P>16 THEN 3780
3710 IF S(8,P-8)<>-1 THEN 3740
3720 PRINT:PRINT TAB(20) "HIT! Ray can't enter board."
3730 GOTO 5240
3740 IF S(8,P-7)<>-1 AND S(8,P-9)<>-1 THEN LOCATE 12,P*3+3:GOTO 4250
3750 PRINT :PRINT TAB(20) "Reflection! Ray can't enter board."
3760 GOTO 5240
3770 'ENTER LEFT
3780 IF P>24 THEN 3860
3790 IF S(25-P,8)<>-1 THEN 3820
3800 PRINT :PRINT TAB(20) "HIT! Ray can't enter board."
3810 GOTO 5240
3820 IF S(24-P,8)<>-1 AND S(26-P,8)<>-1 THEN LOCATE 28-P,54:GOTO 4580
3830 PRINT :PRINT TAB(20) "Reflection! Ray can't enter board."
3840 GOTO 5240
3850 'ENTER DOWN
3860 IF S(1,33-P)<>-1 THEN 3890
3870 PRINT :PRINT TAB(20) "HIT! Ray can't enter board."
3880 GOTO 5240
3890 IF S(1,32-P)<>-1 AND S(1,34-P)<>-1 THEN LOCATE 3,126-P*3:GOTO 4910
3900 PRINT :PRINT TAB(20) "Reflection! Ray can't enter board."
3910 GOTO 5240
3920 'HEADING RIGHT
3930 LOCATE ,POS(0)+2
3940 IF SCREEN(CSRLIN,POS(0)+1)>178 THEN 4190
3950 IF POS(0)=53 THEN 4130
3960 IF SCREEN(CSRLIN,POS(0)+4)<>2 THEN 4010
3970 PRINT "SOUNDSOUND*"
3980 LOCATE 20,20
3990 PRINT "HIT!"
4000 GOTO 5240
4010 IF SCREEN(CSRLIN+1,POS(0)+4)<>2 OR SCREEN(CSRLIN-1,POS(0)+4)<>2 THEN 4080
4020 PRINT "THENTHEN<0xB5!>";
4030 ROW=CSRLIN:COL=POS(0)-2
4040 LOCATE 20,20
4050 PRINT "Reflection!"
4060 LOCATE ROW,COL
4070 GOTO 4580
4080 IF SCREEN(CSRLIN+1,POS(0)+4)=2 THEN PRINT "SOUND' ";:LOCATE ,POS(0)-2:GOTO 4250
4090 IF SCREEN(CSRLIN-1,POS(0)+4)=2 THEN PRINT "SOUNDCOLOR ";:LOCATE ,POS(0)-2:GOTO 4910
7350 PRINT "Entering screen as your guess of the solution:":PRINT
7360 FOR I=1 TO 8
7370 FOR J=1 TO 8
7380 IF B(I,J)=S(I,J) THEN 7410
7390 IF B(I,J)=-1 THEN MISSB=MISSB+1
7400 IF S(I,J)=-1 THEN MISSS=MISSS+1
7410 NEXT J
7420 NEXT I
7430 IF MISSS>MISSB THEN PRINT TAB(20) "You have";MISSS-MISSB;"more rock(s) on the screen than there":PRINT TAB(20) "are in the solution. Try again with the correct number.":GOTO 7660
7440 IF MISSB>MISSS THEN PRINT TAB(20) "You have";MISSB-MISSS;"fewer rock(s) on the screen than there":PRINT TAB(20) "are in the solution. Try again with the correct number.":GOTO 7660
7450 IF MISSB>0 THEN PRINT TAB(20) "You have";MISSB;"rock(s) incorrectly placed.":GOTO 7660
7460 PRINT "Your solution is absolutely correct!"
7470 ROW=CSRLIN
7480 COL=POS(0)
7490 LOCATE 7,1
7500 PRINT TAB(21)
7510 LOCATE ROW,COL
7520 CLUES=32
7530 FOR I=4 TO 11
7540 IF SCREEN(I,24)<>0 AND SCREEN(I,24)<>32 THEN CLUES=CLUES-1
7550 IF SCREEN(I,57)<>0 AND SCREEN(I,57)<>32 THEN CLUES=CLUES-1
7560 NEXT I
7570 FOR I=30 TO 51 STEP 3
7580 IF SCREEN(13,I)<>0 AND SCREEN(13,I)<>32 THEN CLUES=CLUES-1
7590 IF SCREEN(2,I)<>0 AND SCREEN(2,I)<>32 THEN CLUES=CLUES-1
7600 NEXT I
7610 PRINT "Your score is";(CLUES-GUESS)*F
7620 PRINT "Press any key to continue."
7630 ERASE B:ERASE S
7640 B$=INKEY$:IF B$="" THEN 7640
7650 RETURN 460
7660 IF MISSS=MISSB THEN GUESS=GUESS+1
7670 PRINT :PRINT "Press any key to return to the menu."
7680 B$=INKEY$:IF B$="" THEN 7680 ELSE RETURN
7690 'SOLUTION
7700 GOSUB 15030
7710 LOCATE 15,20
7720 PRINT "Display solution:"
7730 LOCATE 7,1
7740 COLOR 15,0
7750 PRINT TAB(10) "SOLUTION "
7760 PRINT TAB(10) "--------"
7770 FOR I=4 TO 11
7780 FOR J=30 TO 51 STEP 3
7790 LOCATE I,J-1
7800 IF B(I-3,J/3-9)=-1 THEN PRINT "(";CHR$(2);")" ELSE PRINT " "
7810 NEXT J
7820 NEXT I
7830 COLOR 7,0
7840 LOCATE 17,20
7850 FOR I=1 TO 8
7860 FOR J=1 TO 8
7870 S(I,J)=B(I,J)
7880 NEXT J
7890 NEXT I
7900 PRINT "Do you want to trace any paths (Y/N)?"
7910 B$=INKEY$:IF B$="" THEN 7910
7920 IF B$<>"n" AND B$<>"N" AND B$<>"y" AND B$<>"Y" THEN 7910
7930 IF B$="Y" OR B$="y" THEN GOSUB 3450
7940 GOSUB 15030
7950 LOCATE 15,20
7960 PRINT :PRINT TAB(20) "Press any key to continue." TAB(80)
7970 ERASE S:ERASE B
7980 B$=INKEY$:IF B$="" THEN 7980
7990 RETURN 460
8000 CLS
8010 LOCATE 10,1,0
8020 PRINT TAB(10) "Please type the letter of the function you want:"
8030 PRINT :PRINT TAB(10) "A. Create a setup to be solved by someone else."
8040 PRINT TAB(10) "B. Load a previously saved setup for solution."
8050 B$=INKEY$:IF B$<>"a" AND B$<>"A" AND B$<>"b" AND B$<>"B" THEN 8050
8060 IF B$="b" OR B$="B" THEN 10620
8070 CRE=2
8080 GOSUB 540
8081 COLOR 7,0
8082 LOCATE 7,1
8083 PRINT "Record #"
8084 PRINT "Displayed: None"
8090 LOCATE 15,1,0
8100 CRE=2
8110 PRINT TAB(20) "A. Review instructions. ";
8120 PRINT TAB(20) "B. Place a rock on the screen. ";
8130 PRINT TAB(20) "C. Remove a rock from the screen. ";
8140 PRINT TAB(20) "D. Trace a path on the screen. ";
8150 PRINT TAB(20) "E. Display all clues for the setup on the screen. ";
8160 PRINT TAB(20) "F. Save/use the display on the screen as a solution. ";
11340 IF I>4 THEN PRINT " End of Listing " ELSE PRINT " No Records on This Disk"
11350 WHILE CSRLIN<23
11360 PRINT TAB(80):PRINT
11370 WEND
11372 GON$=INKEY$:IF GON$="" THEN 11372
11380 CLS
11385 CLOSE 1
11390 RETURN
12000 COLOR 7,0
12005 CLS
12010 LOCATE 10,1,0
12015 CLOSE 1:CLOSE 2
12020 PRINT "Record #";CELL;"does not exist. Press `L' to see a listing of available records,":PRINT "`R' to retry with another number, or `X' to escape form the selection mode."
12030 STRT$=INKEY$:IF STRT$="" THEN 12030
12040 IF STRT$="R" OR STRT$="r" THEN CLS:GOTO 10680
12050 IF STRT$="L" OR STRT$="l" THEN 11100
12060 IF STRT$="X" OR STRT$="x" THEN 460
12070 GOTO 12030
12500 GOSUB 15030
12510 LOCATE 15,2
12520 PRINT "Do you want to see a listing of what is available on the disk (Y/N)?"
12530 GO$=INKEY$:IF GO$="" THEN 12530
12540 IF GO$="Y" OR GO$="y" THEN GOSUB 11100:GOTO 12560
12550 IF GO$<>"N" AND GO$<>"n" THEN 12530 ELSE 12630
12560 COLOR 7,0
12570 CRE=2
12580 GOSUB 540
12590 COLOR 7,0
12600 LOCATE 7,1
12610 PRINT "Record #"
12620 PRINT "Displayed: None"
12630 LOCATE 25,1
12640 PRINT TAB(20) "Pressing `X' will escape from the load/delete mode.";
12650 LOCATE 15,1,0,1,12
12660 PRINT "Type in the record # of the record you want to display (3 characters max.) then press `Enter' for the computer to load the record."
12670 COLOR 1,0:LOCATE 18,38,0:PRINT " " :LOCATE 18,38,1
12680 B$=INKEY$:IF B$="" THEN 12680
12690 IF B$="X" OR B$="x" THEN COLOR 7,0:CLOSE:LOCATE 25,1,0:PRINT TAB(80):RETURN 8081
14840 PRINT "Record #";CELL;"does not exist. Press `L' to see a listing of available records,":PRINT "`R' to retry with another number, or `X' to escape form the selection mode."
14850 STRT$=INKEY$:IF STRT$="" THEN 14850
14860 IF STRT$="R" OR STRT$="r" THEN RETURN 12630
14870 IF STRT$="L" OR STRT$="l" THEN GOSUB 11100:RETURN 12560
14880 IF STRT$="X" OR STRT$="x" THEN COLOR 7,0:CLOSE:LOCATE 25,1,0:PRINT TAB(80):RETURN 8081
14890 GOTO 14850
15000 GOSUB 15030
15001 LOCATE 15,1
15002 PRINT TAB(20) "Please verify end create routine (Y/N)?"
15003 GO$=INKEY$: IF GO$="" THEN 15003
15004 IF GO$="Y" OR GO$="y" THEN 15008
15005 IF GO$<>"n" AND GO$<>"N" THEN 15003
15006 GOTO 8090
15008 CRE=0
15009 ON ERROR GOTO 15011
15010 ERASE S:GOTO 15013
15011 IF ERR<>5 THEN 15019
15012 RESUME 15013
15013 ON ERROR GOTO 15015
15014 ERASE B:GOTO 15019
15015 IF ERR<>5 THEN 15019
15016 RESUME 15019
15019 ON ERROR GOTO 0
15020 GOTO 460
15030 LOCATE 15,1
15040 FOR I=1 TO 9
15050 PRINT BL$
15060 NEXT I
15070 RETURN
15080 FOR I=1 TO 8
15090 LOCATE I+3,29
15100 WHILE POS(0)<53
15110 IF SCREEN(CSRLIN,POS(0))=40 THEN LOCATE ,POS(0)+3:GOTO 15130
15120 PRINT " ";
15130 WEND
15140 NEXT I
15150 RETURN
15160 I=1
15170 WHILE C(I)=0
15180 I=I+1
15190 WEND
15200 IF SCREEN (20,20)<>72 AND SCREEN (20,21)<>101 AND (SCREEN(CSRLIN,POS(0))=0 OR SCREEN(CSRLIN,POS(0))=32) THEN PRINT CHR$(C(I))
15210 IF P>8 THEN 15240
15220 LOCATE P+3,24
15230 GOTO 15310
15240 IF P>16 THEN 15270
15250 LOCATE 13,P*3+3
15260 GOTO 15310
15270 IF P>24 THEN 15300
15280 LOCATE 28-P,57
15290 GOTO 15310
15300 LOCATE 2,126-P*3
15310 IF SCREEN(20,20)=72 THEN COLOR 15,0:PRINT "H":COLOR 7,0:GOTO 15350
15320 IF SCREEN(20,21)=101 THEN COLOR 15,0:PRINT "R":COLOR 7,0:GOTO 15350
15330 IF SCREEN(CSRLIN,POS(0))=0 OR SCREEN(CSRLIN,POS(0))=32 THEN PRINT CHR$(C(I)) ELSE GOTO 15350
15340 C(I)=0
15350 RETURN
15360 FOR Y=1 TO 8:FOR Z=1 TO 8:PRINT B(Y,Z);:NEXT Z:PRINT :NEXT Y
15370 IF ERR<>70 THEN 15420
15380 LOCATE 15,1
15390 PRINT "Disk is write protected. Remove the protect tab or replace the disk with an unprotected one and press any key to restart."
15400 RESUME 15410
15410 B$=INKEY$:IF B$<>"" THEN RETURN ****
15420 IF ERR<>71 THEN 15470
15430 LOCATE 15,1
15440 PRINT "Disk not ready. Check to make sure a disk is in the drive and that the door is closed properly, then press any key."